<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>StringUtil (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="StringUtil (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StringUtil.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/poi/util/ShortList.html" title="class in org.apache.poi.util"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../org/apache/poi/util/StringUtil.StringsIterator.html" title="class in org.apache.poi.util"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/poi/util/StringUtil.html" target="_top">FRAMES</a></li>
<li><a href="StringUtil.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li><a href="#nested_class_summary">NESTED</a>&nbsp;|&nbsp;</li>
<li>FIELD&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li>FIELD&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.util</p>
<h2 title="Class StringUtil" class="title">Class StringUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.util.StringUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <strong>StringUtil</strong>
extends java.lang.Object</pre>
<div class="block">Title: String Utility Description: Collection of string handling utilities<p/>

 Note - none of the methods in this class deals with <a href="../../../../org/apache/poi/hssf/record/ContinueRecord.html" title="class in org.apache.poi.hssf.record"><code>ContinueRecord</code></a>s.  For such
 functionality, consider using <a href="../../../../org/apache/poi/hssf/record/RecordInputStream.html" title="class in org.apache.poi.hssf.record"><code>RecordInputStream</code></a> *</div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Andrew C. Oliver, Sergei Kozello (sergeikozello at mail.ru), Toshiaki Kamoshida (kamoshida.toshiaki at future dot co dot jp)</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.StringsIterator.html" title="class in org.apache.poi.util">StringUtil.StringsIterator</a></strong></code>
<div class="block">An Iterator over an array of Strings.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#format(java.lang.String, java.lang.Object[])">format</a></strong>(java.lang.String&nbsp;message,
      java.lang.Object[]&nbsp;params)</code>
<div class="block">Apply printf() like formatting to a string.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#getEncodedSize(java.lang.String)">getEncodedSize</a></strong>(java.lang.String&nbsp;value)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#getFromCompressedUnicode(byte[], int, int)">getFromCompressedUnicode</a></strong>(byte[]&nbsp;string,
                        int&nbsp;offset,
                        int&nbsp;len)</code>
<div class="block">Read 8 bit data (in ISO-8859-1 codepage) into a (unicode) Java
 String and return.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#getFromUnicodeLE(byte[])">getFromUnicodeLE</a></strong>(byte[]&nbsp;string)</code>
<div class="block">Given a byte array of 16-bit unicode characters in little endian
  format (most important byte last), return a Java String representation
  of it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#getFromUnicodeLE(byte[], int, int)">getFromUnicodeLE</a></strong>(byte[]&nbsp;string,
                int&nbsp;offset,
                int&nbsp;len)</code>
<div class="block">Given a byte array of 16-bit unicode characters in Little Endian
  format (most important byte last), return a Java String representation
  of it.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#getPreferredEncoding()">getPreferredEncoding</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#hasMultibyte(java.lang.String)">hasMultibyte</a></strong>(java.lang.String&nbsp;value)</code>
<div class="block">check the parameter has multibyte character</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#isUnicodeString(java.lang.String)">isUnicodeString</a></strong>(java.lang.String&nbsp;value)</code>
<div class="block">Checks to see if a given String needs to be represented as Unicode</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#putCompressedUnicode(java.lang.String, byte[], int)">putCompressedUnicode</a></strong>(java.lang.String&nbsp;input,
                    byte[]&nbsp;output,
                    int&nbsp;offset)</code>
<div class="block">Takes a unicode (java) string, and returns it as 8 bit data (in ISO-8859-1
 codepage).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#putCompressedUnicode(java.lang.String, org.apache.poi.util.LittleEndianOutput)">putCompressedUnicode</a></strong>(java.lang.String&nbsp;input,
                    <a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#putUnicodeLE(java.lang.String, byte[], int)">putUnicodeLE</a></strong>(java.lang.String&nbsp;input,
            byte[]&nbsp;output,
            int&nbsp;offset)</code>
<div class="block">Takes a unicode string, and returns it as little endian (most
 important byte last) bytes in the supplied byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#putUnicodeLE(java.lang.String, org.apache.poi.util.LittleEndianOutput)">putUnicodeLE</a></strong>(java.lang.String&nbsp;input,
            <a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#readCompressedUnicode(org.apache.poi.util.LittleEndianInput, int)">readCompressedUnicode</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
                     int&nbsp;nChars)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#readUnicodeLE(org.apache.poi.util.LittleEndianInput, int)">readUnicodeLE</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
             int&nbsp;nChars)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#readUnicodeString(org.apache.poi.util.LittleEndianInput)">readUnicodeString</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in)</code>
<div class="block">InputStream <tt>in</tt> is expected to contain:
 
 ushort nChars
 byte is16BitFlag
 byte[]/char[] characterData
 
 For this encoding, the is16BitFlag is always present even if nChars==0.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#readUnicodeString(org.apache.poi.util.LittleEndianInput, int)">readUnicodeString</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
                 int&nbsp;nChars)</code>
<div class="block">InputStream <tt>in</tt> is expected to contain:
 
 byte is16BitFlag
 byte[]/char[] characterData
 
 For this encoding, the is16BitFlag is always present even if nChars==0.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#writeUnicodeString(org.apache.poi.util.LittleEndianOutput, java.lang.String)">writeUnicodeString</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out,
                  java.lang.String&nbsp;value)</code>
<div class="block">OutputStream <tt>out</tt> will get:
 
 ushort nChars
 byte is16BitFlag
 byte[]/char[] characterData
 
 For this encoding, the is16BitFlag is always present even if nChars==0.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/util/StringUtil.html#writeUnicodeStringFlagAndData(org.apache.poi.util.LittleEndianOutput, java.lang.String)">writeUnicodeStringFlagAndData</a></strong>(<a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out,
                             java.lang.String&nbsp;value)</code>
<div class="block">OutputStream <tt>out</tt> will get:
 
 byte is16BitFlag
 byte[]/char[] characterData
 
 For this encoding, the is16BitFlag is always present even if nChars==0.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getFromUnicodeLE(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFromUnicodeLE</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getFromUnicodeLE(byte[]&nbsp;string,
                                int&nbsp;offset,
                                int&nbsp;len)
                                         throws java.lang.ArrayIndexOutOfBoundsException,
                                                java.lang.IllegalArgumentException</pre>
<div class="block">Given a byte array of 16-bit unicode characters in Little Endian
  format (most important byte last), return a Java String representation
  of it.

 { 0x16, 0x00 } -0x16</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>string</code> - the byte array to be converted</dd><dd><code>offset</code> - the initial offset into the
                 byte array. it is assumed that string[ offset ] and string[ offset +
                 1 ] contain the first 16-bit unicode character</dd><dd><code>len</code> - the length of the final string</dd>
<dt><span class="strong">Returns:</span></dt><dd>the converted string, never <code>null</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.ArrayIndexOutOfBoundsException</code> - if offset is out of bounds for
      the byte array (i.e., is negative or is greater than or equal to
      string.length)</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if len is too large (i.e.,
      there is not enough data in string to create a String of that
      length)</dd></dl>
</li>
</ul>
<a name="getFromUnicodeLE(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFromUnicodeLE</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getFromUnicodeLE(byte[]&nbsp;string)</pre>
<div class="block">Given a byte array of 16-bit unicode characters in little endian
  format (most important byte last), return a Java String representation
  of it.

 { 0x16, 0x00 } -0x16</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>string</code> - the byte array to be converted</dd>
<dt><span class="strong">Returns:</span></dt><dd>the converted string, never <code>null</code></dd></dl>
</li>
</ul>
<a name="getFromCompressedUnicode(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFromCompressedUnicode</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getFromCompressedUnicode(byte[]&nbsp;string,
                                        int&nbsp;offset,
                                        int&nbsp;len)</pre>
<div class="block">Read 8 bit data (in ISO-8859-1 codepage) into a (unicode) Java
 String and return.
 (In Excel terms, read compressed 8 bit unicode as a string)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>string</code> - byte array to read</dd><dd><code>offset</code> - offset to read byte array</dd><dd><code>len</code> - length to read byte array</dd>
<dt><span class="strong">Returns:</span></dt><dd>String generated String instance by reading byte array</dd></dl>
</li>
</ul>
<a name="readCompressedUnicode(org.apache.poi.util.LittleEndianInput, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readCompressedUnicode</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readCompressedUnicode(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
                                     int&nbsp;nChars)</pre>
</li>
</ul>
<a name="readUnicodeString(org.apache.poi.util.LittleEndianInput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnicodeString</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readUnicodeString(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in)</pre>
<div class="block">InputStream <tt>in</tt> is expected to contain:
 <ol>
 <li>ushort nChars</li>
 <li>byte is16BitFlag</li>
 <li>byte[]/char[] characterData</li>
 </ol>
 For this encoding, the is16BitFlag is always present even if nChars==0.
 
 This structure is also known as a XLUnicodeString.</div>
</li>
</ul>
<a name="readUnicodeString(org.apache.poi.util.LittleEndianInput, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnicodeString</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readUnicodeString(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
                                 int&nbsp;nChars)</pre>
<div class="block">InputStream <tt>in</tt> is expected to contain:
 <ol>
 <li>byte is16BitFlag</li>
 <li>byte[]/char[] characterData</li>
 </ol>
 For this encoding, the is16BitFlag is always present even if nChars==0.
 <br/>
 This method should be used when the nChars field is <em>not</em> stored
 as a ushort immediately before the is16BitFlag. Otherwise, <a href="../../../../org/apache/poi/util/StringUtil.html#readUnicodeString(org.apache.poi.util.LittleEndianInput)"><code>readUnicodeString(LittleEndianInput)</code></a> can be used.</div>
</li>
</ul>
<a name="writeUnicodeString(org.apache.poi.util.LittleEndianOutput, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUnicodeString</h4>
<pre>public static&nbsp;void&nbsp;writeUnicodeString(<a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out,
                      java.lang.String&nbsp;value)</pre>
<div class="block">OutputStream <tt>out</tt> will get:
 <ol>
 <li>ushort nChars</li>
 <li>byte is16BitFlag</li>
 <li>byte[]/char[] characterData</li>
 </ol>
 For this encoding, the is16BitFlag is always present even if nChars==0.</div>
</li>
</ul>
<a name="writeUnicodeStringFlagAndData(org.apache.poi.util.LittleEndianOutput, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUnicodeStringFlagAndData</h4>
<pre>public static&nbsp;void&nbsp;writeUnicodeStringFlagAndData(<a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out,
                                 java.lang.String&nbsp;value)</pre>
<div class="block">OutputStream <tt>out</tt> will get:
 <ol>
 <li>byte is16BitFlag</li>
 <li>byte[]/char[] characterData</li>
 </ol>
 For this encoding, the is16BitFlag is always present even if nChars==0.
 <br/>
 This method should be used when the nChars field is <em>not</em> stored
 as a ushort immediately before the is16BitFlag. Otherwise, <a href="../../../../org/apache/poi/util/StringUtil.html#writeUnicodeString(org.apache.poi.util.LittleEndianOutput, java.lang.String)"><code>writeUnicodeString(LittleEndianOutput, String)</code></a> can be used.</div>
</li>
</ul>
<a name="getEncodedSize(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncodedSize</h4>
<pre>public static&nbsp;int&nbsp;getEncodedSize(java.lang.String&nbsp;value)</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes that would be written by <a href="../../../../org/apache/poi/util/StringUtil.html#writeUnicodeString(org.apache.poi.util.LittleEndianOutput, java.lang.String)"><code>writeUnicodeString(LittleEndianOutput, String)</code></a></dd></dl>
</li>
</ul>
<a name="putCompressedUnicode(java.lang.String, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putCompressedUnicode</h4>
<pre>public static&nbsp;void&nbsp;putCompressedUnicode(java.lang.String&nbsp;input,
                        byte[]&nbsp;output,
                        int&nbsp;offset)</pre>
<div class="block">Takes a unicode (java) string, and returns it as 8 bit data (in ISO-8859-1
 codepage).
 (In Excel terms, write compressed 8 bit unicode)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - the String containing the data to be written</dd><dd><code>output</code> - the byte array to which the data is to be written</dd><dd><code>offset</code> - an offset into the byte arrat at which the data is start
      when written</dd></dl>
</li>
</ul>
<a name="putCompressedUnicode(java.lang.String, org.apache.poi.util.LittleEndianOutput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putCompressedUnicode</h4>
<pre>public static&nbsp;void&nbsp;putCompressedUnicode(java.lang.String&nbsp;input,
                        <a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</pre>
</li>
</ul>
<a name="putUnicodeLE(java.lang.String, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putUnicodeLE</h4>
<pre>public static&nbsp;void&nbsp;putUnicodeLE(java.lang.String&nbsp;input,
                byte[]&nbsp;output,
                int&nbsp;offset)</pre>
<div class="block">Takes a unicode string, and returns it as little endian (most
 important byte last) bytes in the supplied byte array.
 (In Excel terms, write uncompressed unicode)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - the String containing the unicode data to be written</dd><dd><code>output</code> - the byte array to hold the uncompressed unicode, should be twice the length of the String</dd><dd><code>offset</code> - the offset to start writing into the byte array</dd></dl>
</li>
</ul>
<a name="putUnicodeLE(java.lang.String, org.apache.poi.util.LittleEndianOutput)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putUnicodeLE</h4>
<pre>public static&nbsp;void&nbsp;putUnicodeLE(java.lang.String&nbsp;input,
                <a href="../../../../org/apache/poi/util/LittleEndianOutput.html" title="interface in org.apache.poi.util">LittleEndianOutput</a>&nbsp;out)</pre>
</li>
</ul>
<a name="readUnicodeLE(org.apache.poi.util.LittleEndianInput, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnicodeLE</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readUnicodeLE(<a href="../../../../org/apache/poi/util/LittleEndianInput.html" title="interface in org.apache.poi.util">LittleEndianInput</a>&nbsp;in,
                             int&nbsp;nChars)</pre>
</li>
</ul>
<a name="format(java.lang.String, java.lang.Object[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>format</h4>
<pre>public static&nbsp;java.lang.String&nbsp;format(java.lang.String&nbsp;message,
                      java.lang.Object[]&nbsp;params)</pre>
<div class="block">Apply printf() like formatting to a string.
  Primarily used for logging.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - the string with embedded formatting info
                 eg. "This is a test %2.2"</dd><dd><code>params</code> - array of values to format into the string</dd>
<dt><span class="strong">Returns:</span></dt><dd>The formatted string</dd></dl>
</li>
</ul>
<a name="getPreferredEncoding()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferredEncoding</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getPreferredEncoding()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>the encoding we want to use, currently hardcoded to ISO-8859-1</dd></dl>
</li>
</ul>
<a name="hasMultibyte(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasMultibyte</h4>
<pre>public static&nbsp;boolean&nbsp;hasMultibyte(java.lang.String&nbsp;value)</pre>
<div class="block">check the parameter has multibyte character</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - string to check</dd>
<dt><span class="strong">Returns:</span></dt><dd>boolean result true:string has at least one multibyte character</dd></dl>
</li>
</ul>
<a name="isUnicodeString(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isUnicodeString</h4>
<pre>public static&nbsp;boolean&nbsp;isUnicodeString(java.lang.String&nbsp;value)</pre>
<div class="block">Checks to see if a given String needs to be represented as Unicode</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd>true if string needs Unicode to be represented.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StringUtil.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/poi/util/ShortList.html" title="class in org.apache.poi.util"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../org/apache/poi/util/StringUtil.StringsIterator.html" title="class in org.apache.poi.util"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/poi/util/StringUtil.html" target="_top">FRAMES</a></li>
<li><a href="StringUtil.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li><a href="#nested_class_summary">NESTED</a>&nbsp;|&nbsp;</li>
<li>FIELD&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li>FIELD&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
